#!/bin/sh

########################################################################
# This test checks the basic operations with the KEDR core module.
########################################################################
printf "KEDR core module: @KEDR_CORE_REF@\n"

# Cannot check existence of kernel module if it is given by name only.
#if test ! -f "${KEDR_MODULE}"; then
#    printf "KEDR core module is missing: ${KEDR_MODULE}\n"
#    
#    # test failed
#    exit 1
#fi

@KEDR_CORE_LOAD_COMMAND@
if test $? -ne 0; then
    printf "Failed to load the KEDR core module\n"
    exit 1
fi

@RMMOD@ "@KEDR_CORE_NAME@"
if test $? -ne 0; then
    printf "Failed to unload the KEDR core module\n"
    exit 1
fi

# test passed
exit 0
